﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UGSV_GUI
{
    /// <summary>
    /// Stores the state that the vehicle should be in
    /// </summary>
    public class State
    {
        private string motion = "s";
        private string turn = "s";
        private int speed = 0;  //0 through 9

        public string getOutput()
        {
            return "CMD"+ motion + turn + speed;
        }

        public void goForward()
        {
            motion = "f";
        }

        public void stop()
        {
            motion = "s";
        }

        public void goBackward()
        {
            motion = "b";
        }

        public void turnRight()
        {
            turn = "r";
        }

        public void turnLeft()
        {
            turn = "l";
        }

        public void turnStraight()
        {
            turn = "s";
        }

        public void setSpeed(int a)
        {
            if ((a > 9) || (a < 0))
                return;
            else
                speed = a;
        }

    }
}
